package com.cloudream;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import com.cloudream.toucheventdemo.R;
import com.cloudream.toucheventdemo.dispatch.MyScrollView;

import java.util.ArrayList;
import java.util.List;

public class DispatchActivity extends AppCompatActivity {



    private ListView listView;

    private MyScrollView scrollView;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dispatch);


        DisplayMetrics outMetrics = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getRealMetrics(outMetrics);
        int height = outMetrics.heightPixels;
        Log.d("DispatchActivity","height:"+height);


        listView = findViewById(R.id.listView);

        List<String> data = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            data.add("---- "+i+" ----");
        }


        listView.setAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1,data));
    }



}
